Deprecated: Return type of Ai1wm_Recursive_Directory_Iterator::hasChildren($allow_links = true) should either be compatible with RecursiveDirectoryIterator::hasChildren(bool $allowLinks = false): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/All-In-One-WP-Migration-With-Import-master/lib/vendor/servmask/iterator/class-ai1wm-recursive-directory-iterator.php on line 57
Deprecated: Return type of Ai1wm_Recursive_Directory_Iterator::rewind() should either be compatible with FilesystemIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/All-In-One-WP-Migration-With-Import-master/lib/vendor/servmask/iterator/class-ai1wm-recursive-directory-iterator.php on line 35
Deprecated: Return type of Ai1wm_Recursive_Directory_Iterator::next() should either be compatible with DirectoryIterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/All-In-One-WP-Migration-With-Import-master/lib/vendor/servmask/iterator/class-ai1wm-recursive-directory-iterator.php on line 42
Deprecated: Return type of Ai1wm_Recursive_Extension_Filter::getChildren() should either be compatible with RecursiveFilterIterator::getChildren(): ?RecursiveFilterIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/All-In-One-WP-Migration-With-Import-master/lib/vendor/servmask/filter/class-ai1wm-recursive-extension-filter.php on line 47
Deprecated: Return type of Ai1wm_Recursive_Extension_Filter::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/All-In-One-WP-Migration-With-Import-master/lib/vendor/servmask/filter/class-ai1wm-recursive-extension-filter.php on line 37
Deprecated: Return type of Ai1wm_Recursive_Exclude_Filter::getChildren() should either be compatible with RecursiveFilterIterator::getChildren(): ?RecursiveFilterIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/All-In-One-WP-Migration-With-Import-master/lib/vendor/servmask/filter/class-ai1wm-recursive-exclude-filter.php on line 41
Deprecated: Return type of Ai1wm_Recursive_Exclude_Filter::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/All-In-One-WP-Migration-With-Import-master/lib/vendor/servmask/filter/class-ai1wm-recursive-exclude-filter.php on line 37
Deprecated: Return type of Ai1wm_Recursive_Newline_Filter::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/All-In-One-WP-Migration-With-Import-master/lib/vendor/servmask/filter/class-ai1wm-recursive-newline-filter.php on line 28
/**
* Plugin Name: Auto Post - TiengViet.io
* Plugin URI: https://tiengviet.io/
* Description: Plugin post bài tự động từ Tiengviet.IO - Hỗ trợ phát triển hệ thống PBN tự động.
* Version: 1.0
* Author: TiengViet.IO Team
* Author URI: https://tiengviet.io/
* License: Bản quyền thuộc Tiengviet.IO
*/
include(dirname( __FILE__ )."/inc/class-core.php");
add_filter( 'cron_schedules', 'TV_schedules' );
if ( ! wp_next_scheduled( 'TV_schedules' ) ) {
wp_schedule_event( time(), 'runNow', 'TV_schedules' );
}
add_action( 'TV_schedules', 'TV_checkAPI' );
plugins_url( '/css/tiengviet.css', __FILE__ );
add_action( 'wp_ajax_TV_checkAPI', 'TV_checkAPI' );
add_action( 'wp_ajax_nopriv_TV_checkAPI', 'TV_checkAPI' );
add_action( 'admin_menu', 'adminPanel_settings');
include(plugin_dir_path( __FILE__ )."inc/admincp.php");
add_action('rest_api_init', function () {
register_rest_route( '/tiengviet', 'cate/',array(
'methods' => 'GET',
'callback' => 'get_latest_posts_by_category'
));
register_rest_route( '/tiengviet', 'delete/',array(
'methods' => 'POST',
'callback' => 'delpostbyapi'
));
});
function get_latest_posts_by_category() {
echo json_encode(get_categories(array('hide_empty' => 0)));
}
function delpostbyapi($request){
$params = wp_parse_args( $request->get_params(), [
'token' => '',
'id' => null
] );
$token = $params['token'];
if($token==get_option('TV_AutoPost_Token')){
$post_id = $params['id'];
wp_delete_post($post_id);
return 1;
}
}
?>
Deprecated: ltrim(): Passing null to parameter #1 ($string) of type string is deprecated in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/wordpress-seo-premium/classes/redirect/redirect-util.php on line 114
Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/wordpress-seo-premium/vendor/yoast/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 22
Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/wordpress-seo-premium/vendor/yoast/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 28
Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/wordpress-seo-premium/vendor/yoast/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 22
Deprecated: Constant FILTER_SANITIZE_STRING is deprecated in /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/wordpress-seo-premium/vendor/yoast/wordpress-seo/src/conditionals/third-party/elementor-edit-conditional.php on line 28
Warning: session_start(): Session cannot be started after headers have already been sent in /usr/local/lsws/thoitrangviet247.com/html/wp-content/themes/thoitrangviet247/inc/commerce/cart.php on line 7
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/TVAutoPost/TVAutoPost.php:1) in /usr/local/lsws/thoitrangviet247.com/html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/TVAutoPost/TVAutoPost.php:1) in /usr/local/lsws/thoitrangviet247.com/html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/TVAutoPost/TVAutoPost.php:1) in /usr/local/lsws/thoitrangviet247.com/html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/TVAutoPost/TVAutoPost.php:1) in /usr/local/lsws/thoitrangviet247.com/html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/TVAutoPost/TVAutoPost.php:1) in /usr/local/lsws/thoitrangviet247.com/html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /usr/local/lsws/thoitrangviet247.com/html/wp-content/plugins/TVAutoPost/TVAutoPost.php:1) in /usr/local/lsws/thoitrangviet247.com/html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"code":"rest_no_route","message":"Kh\u00f4ng t\u00ecm th\u1ea5y \u0111\u01b0\u1eddng d\u1eabn n\u00e0o ph\u00f9 h\u1ee3p v\u1edbi URL v\u00e0 ph\u01b0\u01a1ng th\u1ee9c y\u00eau c\u1ea7u.","data":{"status":404}}